function [Ytest, accuracy]=ldaclassify(Xtrain, Ytrain, Xtest, Ytesttrue)


Ytest = classify(Xtest, Xtrain, Ytrain);
ind=find(Ytest==Ytesttrue);
accuracy=100*size(ind,1)/size(Ytesttrue,1)

Ntest=size(Xtest,1);
Clsno=size(unique(Ytrain),1);
temp=zeros(Ntest,Clsno);
temp  = temp';
temp2 = Ytest+Clsno*[0:Ntest-1]';
temp(temp2)=1;
Ytest = temp';


end
